<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  Class: UserDetailSerializer
  
    &mdash; Ruby China API 文档
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  pathId = "UserDetailSerializer";
  relpath = '';
</script>


  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <div class="nav_wrap">
      <iframe id="nav" src="class_list.html"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="_index.html">Index (U)</a> &raquo;
    
    
    <span class="title">UserDetailSerializer</span>
  
</div>

        <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="class_list.html">

        <svg width="24" height="24">
          <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
        </svg>
    </a>
  
</div>
        <div class="clear"></div>
      </div>

      <iframe id="search_frame" src="class_list.html"></iframe>

      <div id="content"><h1>Class: UserDetailSerializer
  
  
  
</h1>
<div class="box_info">
  
  <dl>
    <dt>Inherits:</dt>
    <dd>
      <span class="inheritName"><span class='object_link'><a href="UserSerializer.html" title="UserSerializer (class)">UserSerializer</a></span></span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">ActiveModel::Serializer</li>
          
            <li class="next"><span class='object_link'><a href="BaseSerializer.html" title="BaseSerializer (class)">BaseSerializer</a></span></li>
          
            <li class="next"><span class='object_link'><a href="UserSerializer.html" title="UserSerializer (class)">UserSerializer</a></span></li>
          
            <li class="next">UserDetailSerializer</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
    </dd>
  </dl>
  

  
  
  
  
  

  

  
  <dl>
    <dt>Defined in:</dt>
    <dd>app/serializers/user_detail_serializer.rb</dd>
  </dl>
  
</div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    
<p>用户详细信息 API 返回数据结构</p>

<h2 id="label-attributes">attributes</h2>

<p>用户 API 返回数据结构</p>

<h2 id="label-attributes">attributes</h2>
<ul><li>
<p><strong>id</strong> [Integer] 用户编号</p>
</li><li>
<p><strong>login</strong> [String] 用户名</p>
</li><li>
<p><strong>name</strong> [String] 用户姓名</p>
</li><li>
<p><strong>avatar_url</strong> [String] 头像 URL</p>
</li></ul>
</p>
<ul><li>
<p><strong>location</strong> [String] 城市</p>
</li><li>
<p><strong>company</strong> [String] 公司名称</p>
</li><li>
<p><strong>github</strong> [String] GitHub ID</p>
</li><li>
<p><strong>twitter</strong> [String] Twitter ID</p>
</li><li>
<p><strong>website</strong> [String] 个人主页 URL</p>
</li><li>
<p><strong>bio</strong> [String] 个人介绍</p>
</li><li>
<p><strong>tagline</strong> [String] 一段话的简单个人介绍</p>
</li><li>
<p><strong>email</strong> [String] Email 地址</p>
</li><li>
<p><strong>topics_count</strong> [Integer] 用户创建的话题数量</p>
</li><li>
<p><strong>replies_count</strong> [Integer] 用户创建的回帖数量</p>
</li><li>
<p><strong>following_count</strong> [Integer] 关注了多少人</p>
</li><li>
<p><strong>followers_count</strong> [Integer] 有多少个关注者</p>
</li><li>
<p><strong>favorites_count</strong> [Integer] 收藏的话题数量</p>
</li><li>
<p><strong>level</strong> [String] 用户级别</p>
</li><li>
<p><strong>level_name</strong> [String] 用户级别(用于显示)</p>
</li><li>
<p><strong>created_at</strong> [DateTime] 注册时间 iso8601 格式</p>
</li></ul>


  </div>
</div>
<div class="tags">
  

</div>






  
    <h2>
      Instance Method Summary
      <small><a href="#" class="summary_toggle">collapse</a></small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#email-instance_method" title="#email (instance method)">#<strong>email</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  


  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="UserSerializer.html" title="UserSerializer (class)">UserSerializer</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="UserSerializer.html#avatar_url-instance_method" title="UserSerializer#avatar_url (method)">#avatar_url</a></span></p>

  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseSerializer.html" title="BaseSerializer (class)">BaseSerializer</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="BaseSerializer.html#abilities-instance_method" title="BaseSerializer#abilities (method)">#abilities</a></span></p>

  

  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="email-instance_method">
  
    #<strong>email</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


28
29
30
31
32
33
34</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/serializers/user_detail_serializer.rb', line 28</span>

<span class='kw'>def</span> <span class='id identifier rubyid_email'>email</span>
  <span class='kw'>if</span> <span class='id identifier rubyid_owner?'>owner?</span> <span class='op'>||</span> <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_email_public'>email_public</span> <span class='op'>==</span> <span class='kw'>true</span>
    <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_email'>email</span>
  <span class='kw'>else</span>
    <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

      <div id="footer">
  Generated on Thu Oct 20 19:35:17 2016 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.5 (ruby-2.3.1).
</div>

    </div>
  </body>
</html>